#pragma once
#include "Frame.h"
#include <Windows.h>
#include <vector>
using namespace std;

class CSGD_TextureManager;

class Animation
{
private:
	
	
	vector<Frame>	m_vFrames;
	int				m_nImageID;

	int				m_nCurrFrame;
	float			m_fTimeWaited;
	
	bool			m_bLooping;
	bool			m_bPlaying;
	float			m_fPlaySpeed; //1.0f normal - 2.0f double speed


	CSGD_TextureManager*	m_pTM;



public:
	Animation(void);
	~Animation(void);

	void Initialize(void);

	void Update(float fElapsedTime);

	void Render(int nX, int nY, bool bFlipped, float fScale, DWORD dColorWord);

	void PlayAnimation(float fSpeed = 1.0f, bool bLoop = true, int Curr =0);

	void PauseAnimation(void);

	void ResumeAnimation(void);

	bool LoadAnimationXML(void);

};